/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package vek.XML.parsedObjects;

import java.util.ArrayList;
import vek.Objects.Museum;
import vek.Objects.POI;

/**
 * Simple class to contain the ParsedMuseum data read by the XML Parsers.
 * This class is then used to create the Museum object by giving this object to its constructor.
 * When a ParsedComercial object is created, the ParsedNonComercial class takes care of its own variable changes.
 * @see ParsedAttractions
 * @author Christian, Michal og Jakob (Hold1, gruppe 2)
 */
public class ParsedMuseum extends ParsedNonComercial implements ParsedObjectInterface{
    
    public ArrayList<String> typesOfExhibition;
    public ParsedNonComercial parsedNonComercial;
    
    /**
     * 
     * @param pnc the ParsedNonComercial object which contains all the data from the XML which is not the museum data
     * @param typesExhibition the types of exhibtions this museum has.
     */
    
    public ParsedMuseum(ParsedNonComercial pnc, ArrayList<String> typesExhibition)
    {
        super(pnc);
        typesOfExhibition = typesExhibition;
        parsedNonComercial = pnc;
        //System.out.println(typesOfExhibition.size());
        
    }
    
    @Override
    public String toString()
    {
        String s = super.toString();
        s += " Exhibitions: ";
        for(int i = 0; i < typesOfExhibition.size(); i++)
        {
            s += typesOfExhibition.get(i); 
        }
        return s;
    }
    
    /**
     * Gets this ParsedMuseum as a Museum by instatiating a new Museum object by given this object to its constructor
     * @return a new Museum object based on this object.
     */
    
    public POI getAsPOI()
    {
        return new Museum(this);
    }
    
    

}
